<?php
// INCLUI O ARQUIVO DE FUNCOES
require_once('../../includes/config.php');
require_once('../../includes/functions.php');

// CONECTA NO BANCO DE DADOS
$conn = connect();

// PEGA O ID
$id = sanitize( $_REQUEST['id'] );

// PEGA OS DADOS DA TASK
$teams = select(
	'teams t',
	array( 't.id','t.name' ),
	array( 't.id = '.$id )
);
?>
<form method="post" onsubmit="return Save.team();">
	<input type="hidden" name="action" value="edtTeam" />
	<input type="hidden" name="id" value="<?= $id; ?>" />
	<div class="response"></div>

	<label for="name">Name: </label>
	<input type="text" name="name" value="<?= $teams['data'][0]['name']; ?>" />

	<br />

	<input type="submit" value="Save team" />
</form>